package com.artpri.dao.impl;

import java.util.List;

import org.hibernate.type.StandardBasicTypes;

import com.artpri.dao.GoodsDao;
import com.artpri.model.Goods;

/**
 * @author ZhangSi
 */
public class GoodsDaoImpl extends HibernateDaoImpl<Goods> implements GoodsDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<Integer> findGoodsNumsByShop(Integer shopkeeperNum) {
		String sql = "select goods_num from goods where shopkeeper_num=" + shopkeeperNum;
		return getSqlQuery(sql).addScalar("goods_num", StandardBasicTypes.INTEGER).list();
	}
}
